package org.example.controller;

import org.example.common.dto.Result;
import org.example.service.SwitchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.annotation.security.PermitAll;

/**
 * @Author 李荣
 * @Date 2025/1/4
 * @Description
 */

@RequestMapping("/switch")
@RestController
public class SwitchController {

    @Autowired
    private SwitchService switchService;

    @GetMapping("/{status}")
    public Result<?> updateStatus(@PathVariable("status") Integer status)
    {
        System.out.println("hello");
        return switchService.updateService(status);
    }
}
